﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Mobile/Masters/MobileSite.master" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Mobile_Login" %>

<%@ Register src="Parts/HeadBodyMobile.ascx" tagname="HeadBodyMobile" tagprefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Title" Runat="Server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="Head" Runat="Server">
<script language="javascript" type="text/javascript">
<!--

    function LoginForm() {
        //Username
        if (document.login_form.txtUsername.value == "") {
            alert("Error: Please enter your username.");
            document.login_form.txtUsername.focus();
            return false;
        }

        //Password
        if (document.login_form.txtPassword.value == "") {
            alert("Error: Please enter your password.");
            document.login_form.txtPassword.focus();
            return false;
        }

        //submit form
        //login_form.method="post";
        //login_form.action="/account/login-auth.asp";
        //login_form.submit();
        return true;

    }

    function ForgottenPassword() {

        checkEmail = document.forgot_form.txtEmail.value;
        if ((checkEmail.indexOf('@') < 0) || ((checkEmail.charAt(checkEmail.length - 4) != '.') && (checkEmail.charAt(checkEmail.length - 3) != '.'))) {
            alert("Error: Please enter a valid email address.");
            document.forgot_form.txtEmail.focus();
            return false;
        }

        //submit form
        //forgot_form.method="post";
        //forgot_form.action="/account/forgotten.asp";
        //forgot_form.submit();
        return true;
    }

-->
</script>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="HeadBody" Runat="Server">

    <uc1:HeadBodyMobile ID="HeadBodyMobile1" runat="server" />

    <header>	
	    <a class="goback" href="javascript: history.go(-1)"><strong>Back</strong></a>
        <h1>Account Login</h1>
    </header>

</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="MainContent" Runat="Server">
    <div id="bookdesc">
        <p>In order to purchase items you must first login. 
        Please enter your details in the boxes below.</p>

<div style="padding:8px" id="storelisting-small">

<br/>

<form onsubmit="return LoginForm();" name="login_form" action="" method="post">
<table class="transform">
	<tbody>
        <tr>
			<td>&nbsp;</td>
			<td class="blue"><strong>Username&nbsp;&nbsp;</strong></td>
			<td><input type="text" id="txtUsername" name="txtUsername"/></td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td class="blue"><strong>Password&nbsp;&nbsp;</strong></td>
			<td><input type="password" id="txtPassword" name="txtPassword"/></td>
		</tr>
        <tr>
			<td>&nbsp;</td>
			<td align="right" colspan="2">
			<!--<input type="submit" class="green" value="Login" />-->
			<input type="hidden" value="" name="hdr"/>
			<input type="Submit" class="button" name="Login" value="Login"/>
		</td>
		</tr>
	</tbody>
</table>
</form>
</div>

<br/>

<a name="forgotten"></a>
<h4>Forgotten your Password? </h4>
<p>Enter your email address here and your password will be sent to you.</p>
<div style="padding:8px" id="storelisting-small">

<br/>

<form onsubmit="return ForgottenPassword();" name="forgot_form" action="forgotten-iphone.asp" method="post">
<table class="transform">
	<tbody>
        <tr>
			<td>&nbsp;</td>
			<td nowrap="nowrap" class="blue"><strong>E-Mail Address&nbsp;&nbsp;</strong></td>
			<td><input type="email" id="txtEmail" name="txtEmail"></td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td align="right" colspan="2">
			<!--<input type="submit" class="green" value="Login" />-->
			<input type="hidden" value="" name="hdr">
			<input type="Submit" class="button" name="Submit" value="Submit">			
			</td>
		</tr>
	</tbody>
</table>
</form>
</div>

<br/>

<h4>First time here?</h4>
<p>Haven't got a Login Username or Password?</p>
<p>If you do not have a login username and password please sign up.</p>

<table class="transform">
	<tbody>
        <tr>
		    <td width="155">&nbsp;</td>
		    <td align="right" colspan="2">
			    <a class="button" href="Register.aspx">Register</a><br>
		    </td>
	    </tr>
    </tbody>
</table>
</div>
</asp:Content>